package leetcode20211001;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LUYAO
 * Date: 2021-10-01
 * Time: 21:42
 */
public class Findcishu {
    public static void main(String[] args) {

    }
}

class Solution2 {
    public int search(int[] nums, int target) {
        //不好？看下题解里面的二分法
        int count = 0;
        for (int i = 0; i < nums.length; i++) {
            if(nums[i] == target){
                count++;
            }

        }
        return count;
    }
}
